ROUND (number)
Purpose
This function rounds number n
to integer
digits behind the decimal point (round to nearest, in case of a tie away of the zero).
Syntax
round (number)::=
Usage Notes
- If the second argument is not specified or
NULL
, rounding is conducted to an integer. - If the second argument is negative, rounding is conducted to integer digits in front of the decimal point.
- If the second argument is a positive integer
s
, then the scale of the resulting data type will bes
. - If the data type of
n
isDOUBLE
, then the result data type is alsoDOUBLE
. Due to the problem of representation forDOUBLE
values, the result could contain numbers with more digits after the decimal point than you would expect because of the rounding. Therefore we recommend that you always cast the result to an appropriateDECIMAL
data type. - For more information on the CEIL() and FLOOR() functions, see CEIL[ING] and FLOOR.